<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<script src="../js/vue.js" type="text/javascript"></script>
<body>
    <div id="app">
        <h2>{{msg}}</h2>
        姓：<input type="text" v-model="firstName"><br>
        名：<input type="text" v-model="lastName"><br>
        全名：<span>{{fulleName()}}</span>
    </div>
    
</body>
<script>
    new Vue({
        el:'#app',
        data:{
            msg:'methods实现',
            firstName:'徐',
            lastName:'徐传良'
        },
        methods: {
            fulleName(){
                console.log('@---fullName')
                return this.firstName + '-' + this.lastName
            }
        },
    })
</script>
</html>